﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Acoris
{
#if WIN2D && NET_UWP
    using Windows.UI.Text;
#endif

    class FontHelper
    {
#if WIN2D && NET_UWP
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fontStyle"></param>
        /// <returns></returns>
        public static Windows.UI.Text.FontStyle GetFontStyle(FontStyle fontStyle)
        {
            switch (fontStyle)
            {
                case FontStyle.Bold:
                case FontStyle.Italic:
                    return Windows.UI.Text.FontStyle.Italic;
                case FontStyle.Normal:
                default:
                    return Windows.UI.Text.FontStyle.Normal;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="fontWeight"></param>
        /// <returns></returns>
        public static Windows.UI.Text.FontWeight GetFontWeight(FontWeight fontWeight)
        {
            return new Windows.UI.Text.FontWeight { Weight = (ushort)fontWeight.Weight };
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="fontFace"></param>
        /// <returns></returns>
        public static string GetFontFamily(FontFace fontFace)
        {
            return fontFace.FontFamily;
        }

#endif
}
}
